#include "DriveBack.h"

DriveBack::DriveBack(double timeout) {
	// Use requires() here to declare subsystem dependencies
	// eg. requires(chassis);
	m_timeout = timeout;
	Requires(chassis);
}

// Called just before this Command runs the first time
void DriveBack::Initialize() {
	SetTimeout(m_timeout);
}

// Called repeatedly when this Command is scheduled to run
void DriveBack::Execute() {
	chassis->goBack(1.0);
}

// Make this return true when this Command no longer needs to run execute()
bool DriveBack::IsFinished() {
	return IsTimedOut();
}

// Called once after isFinished returns true
void DriveBack::End() {
	
}

// Called when another command which requires one or more of the same
// subsystems is scheduled to run
void DriveBack::Interrupted() {
}
